feat(context): forward the searchDuringIngestion opt-in to the retriever - #1075
Open
CalebMartinUiPath wants to merge 1 commit into
Open
feat(context): forward the searchDuringIngestion opt-in to the retriever#1075CalebMartinUiPath wants to merge 1 commit into
CalebMartinUiPath wants to merge 1 commit into
Conversation
An agent pointed at a context index that was still ingesting failed outright instead of searching the documents indexed so far. The SDK now exposes search_during_ingestion on the unified search methods, and AgentContextSettings carries the matching searchDuringIngestion flag that the agent designer writes into agent.json. Thread that setting through: ContextGroundingRetriever gains a search_during_ingestion field forwarded to unified_search and unified_search_async, and the semantic context tool reads it off the resource settings. The default is unchanged (False), so an ingesting index still fails fast. The failure now names the toggle, since that is the actionable fix. Requires uipath-platform>=0.2.27 and uipath>=2.14.13, which is where the parameter and the settings field land. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CalebMartinUiPath
force-pushed
the
caleb/allow-search-during-ingestion
branch
from
September 9, 2026 20:07
b1b297d to
98c54a5
Compare
|
There was a problem hiding this comment.
🟡 Changes recommended
Commit the regenerated uv.lock and add sync/async retriever forwarding tests.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Threads searchDuringIngestion from agent configuration through the context tool and retriever to synchronous and asynchronous SDK searches.
Changes:
- Adds setting propagation and ingestion error guidance.
- Adds default, legacy, and opt-in coverage.
- Bumps package and SDK dependencies.
File summaries
| File | Summary |
|---|---|
tests/agent/tools/test_context_tool.py |
Tests setting propagation behavior. |
src/uipath_langchain/retrievers/context_grounding_retriever.py |
Forwards the flag to unified search APIs. |
src/uipath_langchain/agent/tools/context_tool.py |
Reads configuration and passes it to the retriever. |
pyproject.toml |
Updates package and SDK requirements. |
Review details
Suppressed comments (2)
src/uipath_langchain/retrievers/context_grounding_retriever.py:58
- The new sync SDK keyword is not covered by the retriever tests: those tests assert only
include_system_indexes, while the added context-tool tests mockContextGroundingRetrieverand never reachunified_search. Removing this keyword would leave the new tests green, so add a sync retriever test that asserts both the opt-in and default values reach the SDK.
search_during_ingestion=self.search_during_ingestion,
src/uipath_langchain/retrievers/context_grounding_retriever.py:105
- The analogous async SDK forwarding path is also untested: the context-tool tests stop at the mocked retriever constructor, and the existing async retriever tests check only
include_system_indexes. Add an async assertion forsearch_during_ingestionso a regression inunified_search_asynccannot pass unnoticed.
search_during_ingestion=self.search_during_ingestion,
- Files reviewed: 4/4 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+8
to
+10
| "uipath>=2.14.14, <2.15.0", | ||
| "uipath-core>=0.5.29, <0.6.0", | ||
| "uipath-platform>=0.2.24, <0.3.0", | ||
| "uipath-platform>=0.2.29, <0.3.0", |
| folder_path=self.folder_path, | ||
| folder_key=self.folder_key, | ||
| include_system_indexes=self.include_system_indexes, | ||
| search_during_ingestion=self.search_during_ingestion, |
radu-mocanu
approved these changes
Sep 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Why
An agent pointed at a context index that was still ingesting failed outright instead of searching the documents indexed so far. UiPath/uipath-python#1891 adds an opt-in flag for this; this PR threads it through to the agent.
What
ContextGroundingRetrievergains asearch_during_ingestionfield, forwarded on both the sync and async paths.resource.settingsand passes it down.IngestionInProgressExceptionhandler now names the toggle in its detail text, since that is the actionable fix for the user. Its existing test asserts code and category, not the text.One name at every layer:
searchDuringIngestioninagent.json,search_during_ingestionin Python.This repo resolves published wheels — there is no
[tool.uv.sources]. The pins here are bumped touipath-platform>=0.2.29anduipath>=2.14.14, which do not exist on PyPI yet. CI cannot go green until UiPath/uipath-python#1891 merges and releases.The bump is still required for correctness: without it this resolves an SDK lacking the parameter and fails at runtime with a
TypeError.I validated locally by installing the two local SDK packages editable into the venv.
Backward compatibility
Default is unchanged (
False), so an ingesting index still fails fast. Anagent.jsonpredating the toggle reads asFalse— covered bytest_agent_json_predating_the_toggle_keeps_failing_fast, which validates from a raw legacy dict rather than through the test helper, so it exercises the genuinely-absent key.Note the vector store (
ContextGroundingVectorStore) still uses the deprecatedsearch/search_async, which keep their unconditional guard, so it cannot opt in. Only the retriever path is wired.Testing
agent.json, and opt-in.ruffclean,mypyclean on the two changed files.mainwith the same venv, so they are not from this change: 4 intest_output_file_tool.py/test_uipath_cli_tool.py, and 5[legacy]cases intest_jsonschema_pydantic_converter_scenarios.pyfrom feat: bump jsonschema-pydantic-converter to 0.4.1, add datamodel-code-generator backend #1055.Version:
uipath-langchain0.17.5 → 0.17.6.🤖 Generated with Claude Code